﻿using ErrorOr;
using Gnivc.CarDealership.Api.Domain.Entities;

namespace Gnivc.CarDealership.Api.Application.Abstractions.Repositories;

public interface IModelRepository
{
    Task<ErrorOr<IEnumerable<Model>>> GetAllAsync();
    Task<ErrorOr<IEnumerable<Model>>> GetAllByBrandAsync(Guid brandId);
    Task<ErrorOr<Model?>> GetByIdAsync(Guid modelId);
    Task<ErrorOr<Created>> AddAsync(Model model);
    Task <ErrorOr<Updated>> UpdateAsync(Model model);
    Task <ErrorOr<Deleted>> DeleteAsync(Guid modelId);
}
